package com.niuwa.p2p.utils.pycredit;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;

import org.apache.commons.io.IOUtils;
import org.apache.commons.ssl.Base64InputStream;

import com.niuwa.p2p.entity.credit.PengYuanRespInfo;

/*
 * @title PyDecodeUtils.java
 * @description: 提供鹏元征信返回接口的数据解码
 * @author Cupid Wu
 * @version 1.0
 * @created 2015年4月29日
 */
public class PyDecodeUtils {
    
    public static String decodePyResp(PengYuanRespInfo pyri){
        String result = null;
        if(pyri.getEncryptData() != null){
            Base64 base64 = new Base64();
            byte[] re = base64.decode(pyri.getEncryptData());
            result = CompressStringUtil.decompress(re);
        }
        
        return result;

    }
}
